﻿Public Class Cleaner
    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        cleaner()
    End Sub
    Public Sub cleaner()

        retrieval.Getflsundfolintemp(TreeView1, ListBox1)
        retrieval.GetInternetFol(TreeView1, ListBox2)
        retrieval.GetChromeCache(TreeView1, ListBox3, chinterex)
        'TreeView1.ExpandAll()
    End Sub
    Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            retrieval.Getflsundfolintemp(TreeView1, ListBox1)
        If chinterex.Checked = True Then
            retrieval.GetInternetFol(TreeView1, ListBox2)
        End If
        If chchromcach.Checked = True Then
            retrieval.GetChromeCache(TreeView1, ListBox3, chinterex)
        End If
        'TreeView1.ExpandAll()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ProgressBar1.Value = 0
        removal.removeflsundfolintemp()
        retrieval.Getflsundfolintemp(TreeView1, ListBox1)
        ProgressBar1.Value = 10
        If chinterex.Checked = True Then
            removal.RemoveInterExfls(ListBox2)
            retrieval.GetInternetFol(TreeView1, ListBox2)
        End If
        ProgressBar1.Value = 20
        If chchromcach.Checked = True Then
            removal.removechromecahce(ListBox3, ProgressBar1)
            retrieval.GetChromeCache(TreeView1, ListBox3, chinterex)
        End If
        ProgressBar1.Value = 100
        Dialog1.ShowDialog()
        'TreeView1.ExpandAll()
    End Sub
End Class
